package br.com.estevam.sisfin.daos.interfaces;

import java.util.List;

import org.apache.tapestry5.hibernate.annotations.CommitAfter;

import br.com.estevam.sisfin.entities.AbstractEntity;
import br.com.estevam.sisfin.enums.OrderEnums;

public interface AbstractDAO {

	@CommitAfter
	void add(AbstractEntity entity);
	
	@CommitAfter
	void addOrUpdate(AbstractEntity entity);

	@CommitAfter
	void update(AbstractEntity entity);

	@CommitAfter
	void delete(AbstractEntity entity);
	
	List<?> findAll();
	
	List<?> findAllOrderBy(String fieldName, OrderEnums orderType);
	
	Object findById(long id);
	
	int rowCountAll();

}
